﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using ERP_RORZE_SYSTEM;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ERP_RORZE_DLL.Business
{
    public partial class panel_MainReport : UserControl
    {   
        public panel_MainReport()
        {
            InitializeComponent();            
        }

        public void LoadData(string reportName)
        {
            switch (reportName)
            {
                case "rtpPurchaseOrder":
                    rpt_POStatus rpt_POStatus = new rpt_POStatus();
                    rpt_POStatus.CreateDocument();
                    busunessReportViewer.DocumentSource = rpt_POStatus;
                    break;
                case "rptPOCover":
                    rpt_POCover rpt_POCover = new rpt_POCover();
                    rpt_POCover.po_id = "";
                    rpt_POCover.LoadData();
                    rpt_POCover.CreateDocument();
                    busunessReportViewer.DocumentSource = rpt_POCover;
                    break;
            }   
            
            //rpt.CreateDocument();
            //busunessReportViewer.Show();
        }
    }
}
